import java.time.LocalDateTime;
import java.util.*;
public abstract class User {
    protected String userId;
    protected String username;
    protected String password;
    protected LocalDateTime registerTime;
    protected String phoneNumber;
    protected String userType; // "admin", "manager", "front_desk"
    public User(String userId, String username, String password,
                LocalDateTime registerTime, String phoneNumber, String userType) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.registerTime = registerTime;
        this.phoneNumber = phoneNumber;
        this.userType = userType;
    }
    public String getUserId() { return userId; }
    public String getUsername() { return username; }
    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }
    public LocalDateTime getRegisterTime() { return registerTime; }
    public String getPhoneNumber() { return phoneNumber; }
    public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; }
    public String getUserType() { return userType; }
    public void setUserType(String userType) { this.userType = userType; }
    public abstract boolean changePassword(String oldPassword, String newPassword);
}
class Logger {
    public static void log(String operationType, String operator) {
        String log = String.format("[%s] %s - 操作人: %s",
                LocalDateTime.now(), operationType, operator);
        System.out.println(log);
    }
}